package com.bysj.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

public class Topic {
    private int id;
    private String content;
    private int cid;
    private  int uid;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "UTC")
    private String createdate;
    private  String imgurl;
    private User user;
    private Category category;
    private List<TopicReply> topicReplyList;


    public Topic() {
    }

    public Topic(int id, String content, int cid, int uid, String creatdate, String imgurl) {
        this.id = id;
        this.content = content;
        this.cid = cid;
        this.uid = uid;
        this.createdate = createdate;
        this.imgurl = imgurl;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getCid() {
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getCreatedate() {
        return createdate;
    }

    public void setCreatedate(String createdate) {
        this.createdate = createdate;
    }

    public String getImgurl() {
        return imgurl;
    }

    public void setImgurl(String imgurl) {
        this.imgurl = imgurl;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public List<TopicReply> getTopicReplyList() {
        return topicReplyList;
    }

    public void setTopicReplyList(List<TopicReply> topicReplyList) {
        this.topicReplyList = topicReplyList;
    }

    @Override
    public String toString() {
        return "Topic{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", cid=" + cid +
                ", uid=" + uid +
                ", creatdate=" + createdate +
                ", imgurl='" + imgurl + '\'' +
                '}';
    }
}
